from flask import Flask,render_template,jsonify
from analyse.index import *
app = Flask(__name__)


@app.route('/')
def index():
    return render_template('index.html')


@app.route('/wordCloud')
def word_cloud():
    return jsonify(word_cloud_plot_data())

@app.route('/bar/count')
def count():
    return jsonify(tag_count_rank_bar_plot())

@app.route('/bar/mean')
def mean():
    return jsonify(tags_collect_mean_rank_bar_plot())


@app.route('/pie')
def pie():
    return jsonify(every_year_play_list_count_rate_plot())


@app.route('/radar')
def radar():
    return jsonify(play_list_radar_plot())




if __name__ == '__main__':
    app.run()
